/**
 * 
 */
package clientCommunication;

import java.io.IOException;
import java.net.UnknownHostException;

/**
 * @author Danielondon
 *
 */
public interface ICommunication extends Runnable {

	
	/**
	 * Disconnects the current connection
	 * @throws IOException
	 */
	void disconnect();
	
	/**
	 * Sends the Message and receives the reply of the server.
	 * @param message
	 * @throws IOException
	 */
	void SendMessage(String message) throws Exception;
	
	/**
	 * Receives the Message from the Server
	 * @return
	 * @throws IOException
	 */
	Object ReceiveMessage() throws Exception;
	
	/**
	 * Adds a listener to be notified of the messages received.
	 * @param listener
	 */
	void addListener(ClientSocketListener listener);
}
